module.exports = {
  nav_name: '资讯管理', //生成导航菜单
  module_name: 'consult_manager',  //生成路径，与模块名相同
  api: `{
    page: commonPath + "/admin/information/page", 
    detail: commonPath + '/admin/information/get', 
    add: commonPath + '/admin/information/save', 
    edit: commonPath + "/admin/information/edit", //编辑
    del: commonPath + '/admin/information/delete',  //删除
  }`,
  table: {
    nav_name: "资讯列表",
    tipsText: "资讯管理 >> 资讯列表",
    //获取列表页面
    tableData: [
      { title: '序号', name: 'index', type: "normal" },
      { title: '标题', name: 'title', type: "normal", showObj: "{}" },
      {
        title: '封面',
        name: 'img',
        type: "img",
        itemWidth: "220",
        heightVal: "100",
        widthVal: "100",
      },
      {
        title: '展示位置',
        name: 'type',
        type: "opts",
        showName: "typeShow",
        showObj: `{
          "1": "官方宣传",
          "2": "今日头条",
          "3": "企业宣传",
          "4": "人物宣传",
        }`
      },
      { title: '文章来源', name: 'messageSource', type: "normal", showObj: "{}" },
      { title: '添加时间', name: 'gmtModified', type: "normal", showObj: "{}" },
    ],
    tableOpt: [
      // {
      //   type: "view",
      //   text: "查看",
      //   request: false,
      //   jump: "/member_manager/see_detail_member查看"
      // },
      {
        type: "modify",
        text: "编辑",
        request: false,
        jump: "/consult_manager_add_page"
      },
      {
        type: "del",
        text: "删除",
        request: true,
        url: "API.consult_manager.del",
        requestType: 'get',
      },

      // {
      //   type: "changeState",
      //   text: "启用",
      //   request: true,
      //   url: "API.member_manager.del",
      //   requestType: 'post',
      //   params: `{ state: 1 }`,
      //   methodNameTag: 'Enable', //方法衔接拓展名 用于标志不同方法
      // },
    ],
    search: {
      contentArr: {
        select1: {
          labelName: '展示位置  ',
          inputName: 'type',  //输入绑定的变量
          selectOptsName: "typeOpts",
          selectOptsArr: `[
            { value: "1", label: "官方宣传" },
            { value: "2", label: "今日头条" },
            { value: "3", label: "企业宣传" },
            { value: "4", label: "人物宣传" },
            { value: "", label: "全部"},
          ],
          `, //选项数组
        },
        input1: { labelName: '标题', inputName: 'title' },
      },
      searchBtn: {
        text: "查询", //链接与table请求接口相同，不做另外配置
      },
      addBtn: {
        //搜索栏具有添加功能按钮时，设置此字段
        type: "add",
        text: "添加",
        request: false,
        jump: "/consult_manager_add_page"
      },
    },
  },


  //添加页面
  add_page: {
    isGenerate: 'false',
    tipsText: "资讯管理 >> 添加页面",
    formData: {
      //三种类型，输入，下拉，图片上传
      input1: {
        labelName: '资讯标题',
        inputName: 'title',
        isNeed: "true"
      },
      //图片上传
      uploadImg1: {
        labelName: "资讯封面",
        inputName: "img",
        type: "single", //type: "single"
        countLimit: "1",
        uploadMethod: "handleUploadInformationImg",
        isNeed: 'true',
      },
      select1: {
        labelName: '显示位置',
        inputName: 'type',  //输入绑定的变量
        selectOptsName: "typeOpts",
        selectOptsArr: `[
            { value: "1", label: "官方宣传" },
            { value: "2", label: "今日头条" },
            { value: "3", label: "企业宣传" },
            { value: "4", label: "人物宣传" },
          ],
          `, //选项数组
        isNeed: 'true',
      },
      input2: {
        labelName: '资讯来源',
        inputName: 'messageSource'
      },
      input3: {
        labelName: '作者',
        inputName: 'author'
      },
      input4: {
        labelName: "排序", inputName: 'sort',
        // isNeed: "true"
      },
      //富文本组件 富文本组件添加默认背景
      richText1: {
        labelName: '资讯内容',
        inputName: 'content',
        isNeed: 'true',
        minHeight: "160", //高度
        uploadApi: "API.common.upload",
        editContentChangeMethodName: "handleBgEditChange", //改变方法
        isNeed: "true"
      },

      // //三级联动组件
      // address1: {
      //   label: "地址选择",
      //   inputName: "",
      // }

    },
    addBtn: {
      text: '添加',
      url: "API.consult_manager.add"
    },
    editBtn: {
      text: '编辑',
      detailUrl: "API.consult_manager.detail",
      editUrl: "API.consult_manager.edit",
      jump: '/member_page_page',
      isSplitSearchString: 'true', //列表拼接查询字符串
    },
    cancelBtn: { text: "取消" }, //
  },

  // //详情页面
  // detail_page: {

  // }
}
